No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without permission in writing from the publisher. However, you are permitted to make copies of this work, printed or otherwise, as long as said copies are for your personal use only.
-------
Sometimes, it's best to name files based on the current date and time. Other times, you might want to include the date in a file that you are preparing. Many times, you need the date in a specific format. Here, we have several utility scripts that return the current date in the following format:
930201 (starDate)
930201 15.33 (starTime)
1 February 1993 (formDate)
1 Feb 1993 (aformDate)
Wednesday, 1 February 1993 (dowDate)
Wed, 1 Feb 1993 (adowDate)
The scripts are very easy to follow, and you should be able to modify any of them to return a date in a format of your own choosing. Since MicroPhone does not support the ability to write your own functions using scripts, I am introducing a method of faking this: To get the current date in a specific format, run the appropriate script. The current date will be returned to you in a variable with the same name as the script. So, for example, you might do the following:
Do Script "'starDate'"
Alert OK "'Captain''s Log, Star Date ' & starDate & '.'"
The only real difference between starDate being a real function and not, is that you need to call the script before using the value stored in starDate.
Take a look at the scripts in this settings document. Export them and import them into your own documents. Try modifying them to return a format of your own choosing.